import React, { Component } from 'react'
import Test from './Test'

export default class App extends Component {
  render() {
    return (
      <div>
        App
        <hr />
        {/* <Test children="Hello World"/> */}
        {/* 下面写法和上面等价 */}
        {/* <Test>Hello World</Test> */}
        {/* 放数组，注意要放到 {} 里面 */}
        {/* <Test>{['a', 'b']}</Test> */}
        {/* 放 JSX 或者直接放标签 */}
        {/* <Test>{<h2>xxx</h2>}</Test> */}
        {/* <Test>
          <h2>xxx</h2>
        </Test> */}
        <Test>
          {(data) => {
            return <h2>{data}</h2>
          }}
        </Test>
      </div>
    )
  }
}
